.s-gallery-portfolio-item {
    margin: 15px 0;
    position: relative;
}
.s-gallery-portfolio-item .s-gallery-hover-bg {
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    transition: all 0.4s ease;
}
.s-gallery-portfolio-items {
    display: flex;
    flex-flow: row wrap;
    gap: 20px;
    justify-content: center;
    text-align: center;
}
.s-gallery-innerwrap {
    flex: 0 0 auto;
}
.s-gallery-hover-bg .s-gallery-hover-text {
    position: absolute;
    text-align: center;
    margin: 0 auto;
    color: #fff;
    background: -webkit-gradient(linear,left top, left bottom,from(rgba(0,0,0,0.7)),to(rgba(17,30,87,0.8)));
    background: -o-linear-gradient(top,rgba(0,0,0,0.7) 0%,rgba(17,30,87,0.8) 100%);
    background: linear-gradient(to bottom,rgba(0,0,0,0.7) 0%,rgba(17,30,87,0.8) 100%);
    padding: 30% 0 0 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    -webkit-transition: all 0.4s;
    -o-transition: all 0.4s;
    transition: all 0.4s;
}
.s-gallery-hover-bg .s-gallery-hover-text > h4 {
    opacity: 0;
    color: #fff;
    -webkit-transform: translateY(100%);
        -ms-transform: translateY(100%);
            transform: translateY(100%);
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 300;
    text-transform: uppercase;
    transition: all 0.4s ease;
}
.s-gallery-hover-bg:hover .s-gallery-hover-text {
    opacity: 1;
    transition: all 0.4s ease;
}
.s-gallery-hover-bg:hover .s-gallery-hover-text > h4 {
    opacity: 1;
    -webkit-transform: translateY(0);
        -ms-transform: translateY(0);
            transform: translateY(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: all 0.4s ease;
}
.s-gallery-img {
    max-width: 260px;
    height: 180px;
}
.s-gallery-img img {
    -o-object-fit: cover;
       object-fit: cover;
    width: 100%;
    height: 100% !important;
}
.s-gallery__img-caption {
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    position: absolute;
    bottom: 0;
    background-color: rgba(255,255,255,0.8);
    width: 100%;
}
.s-gallery-portfolio-item:hover .s-gallery__img-caption {
    visibility: hidden;
}

@media (min-width: 600px) {
    .s-gallery-img {
        width: 350px;
        height: 230px;
    }
}